#ifndef SPRITESHEET_HPP
# define SPRITESHEET_HPP

# include <QString>
# include <QPixmap>
# include <list>
# include <utility>
# include "Object2D.hpp"

class SpriteSheet: public Object2D
{
public:
    SpriteSheet();
    SpriteSheet(QString const& name, QString const& path, const int initialSpriteWidth, const int initialSpriteHeight);

    void        addSprite(QString const& name, QPixmap pixmap);

    std::list<std::pair<QString, QPixmap> >*    getSprites();

    QPixmap*                                    getImageFromName(QString const& name);

    static bool                                 alreadyLoaded(std::list<SpriteSheet*>& sheetsDictionary, QString newName);
private:
    std::list<std::pair<QString, QPixmap> > _cuttedSprites;
};

#endif // SPRITESHEET_HPP
